#ifndef CAL_H
#define CAL_H

#include <math.h>

struct Vec
{
    double x,y;
    Vec(double xx=0,double yy=0)
    {
        x=xx;
        y=yy;
    }
};

struct Point
{
    double x,y;
    Point(double xx=0,double yy=0)
    {
        x=xx;
        y=yy;
    }
};

double ddot(Vec A,Vec B);
double getlen(Vec A);

double getlen(Point A,Point B);

bool moreThan120(double xa,double ya,double xb,double yb,double xc,double yc);

inline void swap(double &a,double &b);

Point getAnotherPoint(Point A,Point B,Point C);

Point getCrossPoint(Point A,Point A1,Point B,Point B1);


#endif // CAL_H
